<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function getStr1() {
            return new Promise(function (resolve, reject) {
                setTimeout(function () {
                    resolve('我');
                }, 1000);
            });
        }
        function getStr2() {
            return new Promise(function (resolve, reject) {
                setTimeout(function () {
                    resolve('爱');
                }, 1000);
            });
        }
        function getStr3() {
            return new Promise(function (resolve, reject) {
                setTimeout(function () {
                    resolve('米');
                }, 1000);
            });
        }
        function getStr4() {
            return new Promise(function (resolve, reject) {
                setTimeout(function () {
                    resolve('饭');
                }, 1000);
            });
        }
        getStr1().then(function (data) {
            console.log(data);
            return getStr2();
        }).then(function (data) {
            console.log(data);
            return getStr3();
        }).then(function (data) {
            console.log(data);
            return getStr4();
        }).then(function (data) {
            console.log(data);
        })
    </script>
</body>
</html>